package com.woniu.outlet.dao;

import com.woniu.outlet.po.OrderPo;
import com.woniu.outlet.po.OrderPoExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderPoMapper {
    long countByExample(OrderPoExample example);

    int deleteByExample(OrderPoExample example);

    int deleteByPrimaryKey(Long id);

    int insert(OrderPo record);

    int insertSelective(OrderPo record);

    List<OrderPo> selectByExample(OrderPoExample example);

    OrderPo selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") OrderPo record, @Param("example") OrderPoExample example);

    int updateByExample(@Param("record") OrderPo record, @Param("example") OrderPoExample example);

    int updateByPrimaryKeySelective(OrderPo record);

    int updateByPrimaryKey(OrderPo record);

    @Select("select * from erp_order_equipment.ERP_order od where od.id=#{orderId}")
    OrderPo getOrderById(Long orderId);

    @Update("update erp_order_equipment.ERP_order od set od.order_status=#{status} where od.id=#{id}")
    void updateOrderStatus(@Param("id") Long id,@Param("status") String status);
}